//
//  GlobalPch.swift
//  FirstSwiftProduct
//
//  Created by 范泽华 on 2017/10/10.
//  Copyright © 2017年 范泽华. All rights reserved.
//

import UIKit
import SDWebImage
import Alamofire
import YYKit


/** 热门页接口*/
let kHotLiveAPI = "http://116.211.167.106/api/live/aggregation?uid=133825214&interest=1"

/******************************* api  *********************************/
let mainURL = "https://api.zihe8888.com/api/"
let staticURL = "https://static.zihe8888.com"
let wapURL = "https://wap.zihe8888.com"

/******************************* 注册api  *********************************/


/******************************* 登录api  *********************************/


//轮播图片
//#define  yt_PicAdvert_Path   @"Content/PicAdvert"
let PicAdvertPath = "Content/PicAdvert"


let ProductHomePath = "Product/Home"



/******************************* 地址api  *********************************/

//获取关于我们
//#define yt_AboutUs_path @"Common/AboutUs"
let AboutUsPath = "Common/AboutUs"


/******************************* size  *********************************/
//tabbar高度
let kTabBarHight:CGFloat = UIApplication.shared.statusBarFrame.size.height>20 ? 83:49
//状态栏高度
let kStatus_bar_height = 20
//导航栏高度
let kNavigation_bar_height = UIApplication.shared.statusBarFrame.size.height > 20 ? 68:44

//状态栏 + 导航栏高度
let kStatus_Navigation_height = kStatus_bar_height + kNavigation_bar_height


//屏幕rect
let SCREEN_WIDTH = UIScreen.main.bounds.size.width

let SCRENN_HEIGHT = UIScreen.main.bounds.size.height

let SCREEN_BOUNDS = UIScreen.main.bounds

//顶部电池条的状态栏高度
let kStatubarHeight = UIApplication.shared.statusBarFrame.size.height

//相对iphone6 屏幕缩放比
let scaleHeight = SCRENN_HEIGHT / 667.0
let scaleWidth = SCREEN_WIDTH / 375.0

func MY_CGRECTMAKE(x:CGFloat,y:CGFloat,width:CGFloat,height:CGFloat) -> CGRect {
    let rect = CGRect(x: x * scaleWidth, y: y * scaleHeight, width: width * scaleWidth, height: height * scaleHeight)
    return rect
    
}

/******************************* system *********************************/

//大字
let kCusBigTextFont = UIFont.init(name: "FZShaoEr-M11S", size: 22)
//常规
let kCusMidTextFont = UIFont.init(name: "FZShaoEr-M11S", size: 20)
//小字
let kCustomSmallTextFont = UIFont.init(name: "FZShaoEr-M11S", size: 15)
//系统大字
let kBigTextFont = UIFont.systemFont(ofSize: 16)
//系统常规
let kMidTextFont = UIFont.systemFont(ofSize: 14)
//系统小字
let kSmallTextFont = UIFont.systemFont(ofSize: 12)



/*******************************   颜色  *********************************/
//项目主题颜色 字体大小等
let kThemeColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#d9261c")
let kMaxTextFont = 17
let kMargin = 8
let kMainOrange = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#c6aa69")
let MainTextColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#ffffff")

let kBlackTextColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#333333")
let kBgColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#f7f7f7")
let kTextFieldColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#e9e9e9")
let kPlaceholderColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#e6e6e6")
let klineColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#ebebeb")

let ktextColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#2B2B2B")


//背景灰色
let kBgDarkColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#efefef")
//背景白色
let kBgWhiteColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#FFFFFF")
//边框颜色
let kBorderLineColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#e4e4e4")
//边框粗细
let kBorderLineThickness = 0.8
//默认黑
let kBlackColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#303030")
//中性黑 偏灰
let kMidBlackColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#707070")
//浅黑 textfield等placehorder文字颜色、时间
let minBlackColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#ababab")
//用于cell灰色
let kCellBackGroundColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#fafafa")
//cell边线粗细
let kBorderCellLineThickness = 8
//橙色
let kOrangeColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#ff9900")
//红色
let kRedColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#fd0305")
//橘红色
let kHyacinthColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#f95b03")
//蓝青色
let kIndingoColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#12acf2")
//绿色
let kgreenColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#56ba22")
//蓝色
let kBlueColor = UIColor.colorWithHexString_alpha(alpha: 1.0, color: "#4cbaff")

//RGB颜色
func RGBColor(r:CGFloat,g:CGFloat,b:CGFloat)->(UIColor){
    return UIColor.init(red: r, green: g, blue: b, alpha: 1.0)
}

//随机色
func FzhRandColor()->UIColor{
    return RGBColor(r: CGFloat(arc4random_uniform(256)), g: CGFloat(arc4random_uniform(256)), b: CGFloat(arc4random_uniform(256)))
}












